﻿namespace Codeblack.TfsScrumboard.UI.Controls
{
    using System;
    using System.Globalization;
    using System.Web;
    using System.Web.UI.WebControls;
    using Codeblack.TfsScrumboard.Resources;
    using Microsoft.TeamFoundation.WebAccess;
    using Microsoft.TeamFoundation.WebAccess.Common;
    using Microsoft.TeamFoundation.WebAccess.Controls;
    using Microsoft.TeamFoundation.WebAccess.UI;
    using Codeblack.TfsScrumboard.ViewModels;

    public class BacklogsControl : WebAccessUserControl
    {
        #region Control fields

        protected BacklogGroupControl project;
        protected BacklogGroupControl history;
        protected BacklogGroupControl current;
        protected BacklogGroupControl future;

        #endregion

        #region Properties

        public BacklogsViewModel Model { get; set; }

        #endregion

        #region Page overrides

        /// <summary>
        /// Handles the System.Web.UI.Control.Load event.
        /// </summary>
        /// <param name="e">The System.EventArgs object that contains the event data.</param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.project.Model = this.Model.Project;
            this.history.Model = this.Model.History;
            this.current.Model = this.Model.Current;
            this.future.Model = this.Model.Future;
        }

        #endregion
    }
}
